package vn.ikame.android.truyenf17;

import vn.ikame.android.truyenf17voz.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class Splash extends Activity{
	protected boolean _active = true;
	protected int splashTime = 2000;
	
//	public static Typeface tf;
	
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
       
        Thread splashTread = new Thread() {
			@Override
			public void run() {
				try {
					int waited = 0;
					while (_active && (waited < splashTime)) {
						sleep(100);
						if (_active) {
							waited += 100;
						}
					}
				} catch (InterruptedException e) {
					// do nothing
				} finally {
					startActivity(new Intent(Splash.this, StoryList.class));
					Splash.this.finish();
				}
			}
		};
		splashTread.start();
		
	    
    }
}
